
function validateArticle() {
	if (checkArticle()) {
		return true;
	} else {
		return false;
	}
}
function checkArticle() {
	var articleTitle = document.inputForm.articleTitle.value;
	var articleContent = document.inputForm.articleContent.value;
	if (articleTitle.length == 0) {
		alert("title must not null");
		document.inputForm.articleTitle.focus();
		return false;
	}
	if (articleContent.length == 0) {
		alert("content must not null");
		document.inputForm.articleContent.focus();
		return false;
	}
	return true;
}
function validateComment() {
	var comment = document.commentForm.commentContent.value;
	if (comment.length == 0) {
		alert("comment content must not null");
		document.commentForm.commentContent.focus();
		return false;
	}
	return ture;
}

function validateLogin(){
    var loginAccount = document.loginForm.loginAccount.value;
    var password = document.loginForm.password.value;
    if(loginAccount.length == 0){
    alert("account must not null");
    document.loginForm.loginAccount.focus();
    return false;
    }
    if(password.length == 0){
     alert("password must not null");
    document.loginForm.password.focus();
    return false;
    }
    return true; 

}
function leaveMessageValidate(){
   var leaveMsg = document.leavemsg.message.value;
	if (leaveMsg.length == 0) {
		alert("leave message must not null");
		document.leavemsg.message.focus();
		return false;
	}
	return ture;

}